package com.pxr.oop.extendsdemo;

public class Student1 extends Person{
    //属性
    private String stuNum;
    private String stuSCore;

    //行为

    public Student1() {
        System.out.println("执行子类默认的构造方法");
    }

    public Student1(String perName, int perAge, String perSex, String stuNum, String stuSCore) {
        super(perName, perAge, perSex);
        System.out.println("执行子类自定义的构造方法");
        this.stuNum = stuNum;
        this.stuSCore = stuSCore;
    }

    public String getStuNum() {
        return stuNum;
    }

    public void setStuNum(String stuNum) {
        this.stuNum = stuNum;
    }

    public String getStuSCore() {
        return stuSCore;
    }

    public void setStuSCore(String stuSCore) {
        this.stuSCore = stuSCore;
    }

    public void doSleep() {
        System.out.println("I am sleeping");
    }
}
